package net.yla.smartbus.module.ba.right.admin.service.impl;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import net.yla.smartbus.module.ba.right.admin.mapper.CaptchasMapper;
import net.yla.smartbus.module.ba.right.admin.entity.CaptchasDO;
import net.yla.smartbus.module.ba.right.admin.service.CaptchasService;
/**
 * @Date: 2020-08-18 10:14
 * @Author: Being Nobody
 * @Version: 1.0
 */
@Service
public class CaptchasServiceImpl implements CaptchasService{

    @Resource
    private CaptchasMapper captchasMapper;

    @Override
    public int deleteByPrimaryKey(Integer captchaId) {
        return captchasMapper.deleteByPrimaryKey(captchaId);
    }

    @Override
    public int insert(CaptchasDO record) {
        return captchasMapper.insert(record);
    }

    @Override
    public int insertSelective(CaptchasDO record) {
        return captchasMapper.insertSelective(record);
    }

    @Override
    public CaptchasDO selectByPrimaryKey(Integer captchaId) {
        return captchasMapper.selectByPrimaryKey(captchaId);
    }

    @Override
    public int updateByPrimaryKeySelective(CaptchasDO record) {
        return captchasMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(CaptchasDO record) {
        return captchasMapper.updateByPrimaryKey(record);
    }

    /**
     * 获取验证码信息
     * @param ip1
     * @return
     */
    @Override
    public CaptchasDO getByIP(long ip1) {
        return captchasMapper.selectByIP(ip1);
    }

}
